﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class WakeUpConfigBase
{

}

public class PrefabCommonBase : MonoBehaviour
{
    private EnumItemState state_ = EnumItemState.E_ACTIVE;
    public EnumItemState State {
        get { return this.state_; }
        set {
            if (this.state_ != value) {
                switch (value) {
                    case EnumItemState.E_ACTIVE:
                        this.onActive();
                        break;
                    case EnumItemState.E_IDLE:
                        this.onIdle();
                        break;
                    case EnumItemState.E_SLEEP:
                        this.onSleep();
                        break;
                }
            }
            this.state_ = value;
        }
    }

    public virtual void SetStatusByConfig(WakeUpConfigBase config) { }

    protected virtual void onActive() { }
    protected virtual void onIdle() { }
    protected virtual void onSleep() { }

}
